import React from "react";
interface stateType{
    title:string
}
interface propsType{
    list:object
}
interface CartType<T>{
    hobby:string[]
    sayHi(name:T):void
}

export default class Cart extends React.Component<propsType,stateType>implements CartType<String>{
    hobby: string[];
    constructor(props:propsType){
        super(props)
        this.hobby=['asd']
        this.state={
            title:'car页面'
        }
    }
    sayHi(name: string){

    }
    render() {
        return(
        <fieldset>
            <legend>Cart</legend>
            <h1>{this.state.title}</h1>
        </fieldset>
        )
    }
}